package com.brillilab.domain.po.lab;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.brillilab.domain.enums.lab.LabMemberPowerEnum;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;

import lombok.Data;





/**实验室成员权限实体对象*/
@Data
@TableName("lab_member_power")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class LabMemberPower implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**权限ID*/
	@TableId(type=IdType.AUTO)
	private Long id;

    /**实验室ID*/
    private Long labId;

    /**实验室成员ID*/
    private Long labMemberId;

    /**权限*/
    private String power;
    
	/**创建时间*/
	@JsonIgnore
	private Date createTime;

	/**修改时间 */
	@JsonIgnore
	private Date updateTime;

	 /**权限名称*/
    @TableField(exist = false)
	private String powerName;

	public String getPowerName(){
	    return LabMemberPowerEnum.Power.getKey(this.power) !=null ? LabMemberPowerEnum.Power.getKey(this.power) : powerName;
    }

	
}
